import 'package:flutter/material.dart'


import 'package:flutter_move/main.dart';void main(){
  runApp(const movieApp());
}

class movieApp extends StatelessWidget{
  const movieApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title:'电影列表',
      theme:ThemeData(
        primarySwatch:Colors.purple,
        primaryColor:const Color(0xFF8E24AA),
        appBarTheme: const AppBarTheme(
          backgroundColor: Color(0xFF8E24AA),
          foregroundColor: Colors.white,
          elevation:0
        ),
      ),
      home:const MovieListPage(),
      debugShowCheckedModeBanner:false
    );
  }
}

class MovieListPage extends StatefulWidget{
  const MovieListPage({super.key});
  @override
  State<MovieListPage> createState() =>_MovieListPageState()
}

class _MovieListPageState extends State<MobieListPage>{
  final GlobalKey<ScaffoldState> _scaffoldKey = Global<ScaffoldState>();

  @override
  Widget build(BuildContext context){
    return Scaffold(
      key:_scaffoldkey,
      appBar:AppBar(
        title:const Text(
          '电影列表',
          style:TextStyle(fontSize: 18,fontWeight:FontWeight.w500),
        ),
        leading:IconButton(
          icon:const Icon(Icons.menu),
            onPressed:(){
              _scaffoldKey.currentState?.openDrawer();
            },
        ),
        actions:[
          IconButton(
            icon:const Icon(Icon.search),
            onPressed:(){
              ScaffoldMessenger.of(
                context,
              ).showSnackBar(const SnackBar(content:Text("搜索功能")));
            },
          ),
        ],
      ),
      drawer: const CustomDrawer(),
      body:Container(
        decoration:const BoxDecoration(
          
        )
      )
    );
  }
}